package com.insuremonitor.system.service.impl;

import java.util.List;
import com.insuremonitor.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.insuremonitor.system.mapper.FrontReportInsureMapper;
import com.insuremonitor.system.domain.FrontReportInsure;
import com.insuremonitor.system.service.IFrontReportInsureService;

/**
 * 保险报案Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-14
 */
@Service
public class FrontReportInsureServiceImpl implements IFrontReportInsureService 
{
    @Autowired
    private FrontReportInsureMapper frontReportInsureMapper;

    /**
     * 查询保险报案
     * 
     * @param reportId 保险报案主键
     * @return 保险报案
     */
    @Override
    public FrontReportInsure selectFrontReportInsureByReportId(Long reportId)
    {
        return frontReportInsureMapper.selectFrontReportInsureByReportId(reportId);
    }

    /**
     * 查询保险报案列表
     * 
     * @param frontReportInsure 保险报案
     * @return 保险报案
     */
    @Override
    public List<FrontReportInsure> selectFrontReportInsureList(FrontReportInsure frontReportInsure)
    {
        return frontReportInsureMapper.selectFrontReportInsureList(frontReportInsure);
    }

    /**
     * 新增保险报案
     * 
     * @param frontReportInsure 保险报案
     * @return 结果
     */
    @Override
    public int insertFrontReportInsure(FrontReportInsure frontReportInsure)
    {
        frontReportInsure.setCreateTime(DateUtils.getNowDate());
        return frontReportInsureMapper.insertFrontReportInsure(frontReportInsure);
    }

    /**
     * 修改保险报案
     * 
     * @param frontReportInsure 保险报案
     * @return 结果
     */
    @Override
    public int updateFrontReportInsure(FrontReportInsure frontReportInsure)
    {
        frontReportInsure.setUpdateTime(DateUtils.getNowDate());
        return frontReportInsureMapper.updateFrontReportInsure(frontReportInsure);
    }

    /**
     * 批量删除保险报案
     * 
     * @param reportIds 需要删除的保险报案主键
     * @return 结果
     */
    @Override
    public int deleteFrontReportInsureByReportIds(Long[] reportIds)
    {
        return frontReportInsureMapper.deleteFrontReportInsureByReportIds(reportIds);
    }


}
